package cn.wgx.modules.sys.entity;

import cn.wgx.modules.base.entity.BaseEntity;

import java.io.Serializable;
import java.util.Date;

/**
 * Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
 * Description:
 * 
 *
 * @author 
 */
public class SysRolePermission extends BaseEntity implements Serializable {
    /**
     *
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    private Integer role_permission_id;

    /**
     *
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    private Integer roleId;

    /**
     *
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    private Integer permissionId;

    /**
     *
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    private Integer createUserId;

    /**
     *
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    private Date createDate;

    /**
     *
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    private Integer updateUserId;

    /**
     *
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    private Date updateDate;

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method returns the value of the database column cgcenter..sys_role_permission.role_permission_id
     *
     * @return the value of cgcenter..sys_role_permission.role_permission_id
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public Integer getRole_permission_id() {
        return role_permission_id;
    }

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public SysRolePermission withRole_permission_id(Integer role_permission_id) {
        this.setRole_permission_id(role_permission_id);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_role_permission.role_permission_id
     *
     * @param role_permission_id the value for cgcenter..sys_role_permission.role_permission_id
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public void setRole_permission_id(Integer role_permission_id) {
        this.role_permission_id = role_permission_id;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_role_permission.roleId
     *
     * @return the value of cgcenter..sys_role_permission.roleId
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public Integer getRoleId() {
        return roleId;
    }

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public SysRolePermission withRoleId(Integer roleId) {
        this.setRoleId(roleId);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_role_permission.roleId
     *
     * @param roleId the value for cgcenter..sys_role_permission.roleId
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_role_permission.permissionId
     *
     * @return the value of cgcenter..sys_role_permission.permissionId
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public Integer getPermissionId() {
        return permissionId;
    }

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public SysRolePermission withPermissionId(Integer permissionId) {
        this.setPermissionId(permissionId);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_role_permission.permissionId
     *
     * @param permissionId the value for cgcenter..sys_role_permission.permissionId
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public void setPermissionId(Integer permissionId) {
        this.permissionId = permissionId;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_role_permission.createUserId
     *
     * @return the value of cgcenter..sys_role_permission.createUserId
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public Integer getCreateUserId() {
        return createUserId;
    }

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public SysRolePermission withCreateUserId(Integer createUserId) {
        this.setCreateUserId(createUserId);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_role_permission.createUserId
     *
     * @param createUserId the value for cgcenter..sys_role_permission.createUserId
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_role_permission.createDate
     *
     * @return the value of cgcenter..sys_role_permission.createDate
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public SysRolePermission withCreateDate(Date createDate) {
        this.setCreateDate(createDate);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_role_permission.createDate
     *
     * @param createDate the value for cgcenter..sys_role_permission.createDate
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_role_permission.updateUserId
     *
     * @return the value of cgcenter..sys_role_permission.updateUserId
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public Integer getUpdateUserId() {
        return updateUserId;
    }

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public SysRolePermission withUpdateUserId(Integer updateUserId) {
        this.setUpdateUserId(updateUserId);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_role_permission.updateUserId
     *
     * @param updateUserId the value for cgcenter..sys_role_permission.updateUserId
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    /**
     * This method returns the value of the database column cgcenter..sys_role_permission.updateDate
     *
     * @return the value of cgcenter..sys_role_permission.updateDate
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public Date getUpdateDate() {
        return updateDate;
    }

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public SysRolePermission withUpdateDate(Date updateDate) {
        this.setUpdateDate(updateDate);
        return this;
    }

    /**
     * This method sets the value of the database column cgcenter..sys_role_permission.updateDate
     *
     * @param updateDate the value for cgcenter..sys_role_permission.updateDate
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", role_permission_id=").append(role_permission_id);
        sb.append(", roleId=").append(roleId);
        sb.append(", permissionId=").append(permissionId);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateUserId=").append(updateUserId);
        sb.append(", updateDate=").append(updateDate);
        sb.append("]");
        return sb.toString();
    }

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysRolePermission other = (SysRolePermission) that;
        return (this.getRole_permission_id() == null ? other.getRole_permission_id() == null : this.getRole_permission_id().equals(other.getRole_permission_id()))
            && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()))
            && (this.getPermissionId() == null ? other.getPermissionId() == null : this.getPermissionId().equals(other.getPermissionId()))
            && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()));
    }

    /**
     *
     * @mbg.generated Tue May 28 17:28:34 CST 2019
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRole_permission_id() == null) ? 0 : getRole_permission_id().hashCode());
        result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode());
        result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        return result;
    }
}